package com.yang.spingboot.yixincallback.qiangqiang;

import java.util.ArrayList;

/**
 * @author yanwei.yang
 * @date 2022/1/20 18:36
 * @description:
 */
public class IndexEntry {
    private String word;
    private ArrayList<Integer> numsList;


    public IndexEntry(String s) {
        word = s.toUpperCase();
        numsList = new ArrayList<Integer>(0);
    }

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }

    public ArrayList<Integer> getNumsList() {
        return numsList;
    }

    public void setNumsList(ArrayList<Integer> numsList) {
        this.numsList = numsList;
    }


    public void add(int num) {
        if (!numsList.contains(num)) {
            numsList.add(num);
        }
    }

    @Override
    public String toString() {
        return "word='" + word + '\'' +
                ", numsList=" + numsList;
    }
}
